﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core
{
    /// <summary>
    /// Specify how IPropertyCache handle a propertiy.
    /// </summary>
    [Flags]
    public enum PropertyCacheOptions : int
    {
        None = 1 << 0, 
        /// <summary>
        /// Can be cached.
        /// </summary>
        Cachable = 1 << 1, 

        /// <summary>
        ///  Can be changed using SetPropertyAsync() 
        /// </summary>
        Changeable = 1 << 2,

        /// <summary>
        /// Can be cleared using ResetCache method.
        /// </summary>
        Resettable = 1 << 3, 

        /// <summary>
        /// If not in property cache, must include PrimaryPropertyProvider for that property.
        /// </summary>
        RequireConnected = 1 << 4,

        Default = Cachable | Changeable | Resettable,
        DefaultRequireConnected = Default | RequireConnected
    }
}
